function executionCode() {
  return new Promise((resovle, reject) => {
    try {
      setTimeout(() => {
        resovle();
      }, 0);
      throw new Error('故意报个错');
    } catch {
      reject();
    }
  });
}
executionCode()
  .then(() => {
    console.log('true');
  })
  .catch(() => {
    console.log('false');
  });
